#ifndef SM3_UTILS_H
#define SM3_UTILS_H

#include <stdint.h>
#include <stddef.h>

#define SM3_DIGEST_LENGTH 32

// 计算数据的SM3哈希值
int sm3_hash(const uint8_t *data, size_t data_len, uint8_t digest[SM3_DIGEST_LENGTH]);

// 验证哈希值
int sm3_verify(const uint8_t *data, size_t data_len, const uint8_t expected_digest[SM3_DIGEST_LENGTH]);

#endif // SM3_UTILS_H